#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

import re


def TestMatch(strr):
    regex = '^oa_package/[\da-f]{2}/[\da-f]{2}/PMC\d{5,7}\.tar\.gz$'
    match = re.match(regex, strr)
    if match:
        return True
    else:
        return False


if __name__ == "__main__":
    infile = open("oa_file_list.txt.20170109", "r")
    infile.readline()
    for line in infile:
        line = line.rstrip("\n")
        splitline = line.split("\t")
        if not TestMatch(splitline[0]):
            print line
    infile.close()
